Rest API

MDriven Turnkey can easily expose services via REST: Exposing Ourselves as a REST Service

You can also consume REST services from other systems: Rest Services In MDriven

The case below is about integrations with MOMO (Mobile Money) open APIs, show case show MDriven consuming RESTful APIs from an external system.

Here we see a UI of all the major services from the collections end points for MOMO API endpoints.

  1. Authentication
  2. Request-To-Pay
  3. Transaction Status Inquiry
  4. Account Balance Inquiry
  5. User Information Query (KYC - Know-Your-Customer) Details

Authentication - POST

There are two credentials used in the open API

  • Subscription Key
  • API User and API Key for Oauth 2.0

The subscription key is used to give access to APIs in the API Manager portal. A user is assigned a subscription Key as and when the user subscribes to products in the API Manager Portal.

The API User and API Key are used to grant access to the wallet system in a specific country. API user and Key are wholly managed by the user through Partner Portal.

Users are allowed to generate/revoke API Keys through the Partner Portal.

However, on Sandbox Environment a Provisioning API is exposed to enable users to generate their own API User and API Key for testing purposes only.

Documentation Rest API 1733088545136.png
Documentation Rest API 1733089124595.png
Documentation Rest API 1733088844666.png


The HEADERMINUS_Ocp_Apim_Subscription_Key: Ensures when the header parameter in this case is Ocp-Apim-Subscription-Key is formatted correctly using the HEADERMINUS prefix and introducing underscores(_) where there should have been (-).

Request-To-Pay - POST

Request to Pay service is used for requesting a payment from a customer (Payer). This can be used by e.g. an online web shop to request a payment from a customer. The customer is requested to approve the transaction on the customer client.

Below is the expected postman and MDriven implementation.

Documentation Rest API 1733090712496.png
Documentation Rest API 1733090924347.png
Documentation Rest API 1733090829606.png




Transaction Status Inquiry - GET

This operation is used to get the status of the payment that has been made as in the above request-to-pay execution. The X-Reference-Id that was passed in the post is used as reference to the request as shown below.

Note: It is convenient to generate a new JWT token as in the authentication before executing any of the services in a production setting to avoid cases of failed execution due to token getting expired.

Documentation Rest API 1733091988156.png


Documentation Rest API 1733092371149.png
Documentation Rest API 1733093411490.png






Account Balance Inquiry - GET

This operation is used to get your own account balance on the Mobile Money Wallet.

Below is how the request will look like.

The request start by generating a bearer token, then adding the relevant headers to the request and sending a GET request to the sandbox.

Documentation Rest API 1733093279818.png
Documentation Rest API 1733094208984.png
Documentation Rest API 1733093914286.png









Basic User Information Inquiry - GET

At the time of the documentation, the service for getting basic user information was inaccessible, regardless the intention for which this documentation was intended has been achieved. You can proceed and run any other API based integrations where MDriven is consuming RESTful APIs from the incoming service.

This page was edited 29 days ago on 12/02/2024. What links here